home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / sun / font / LayoutPathImpl$SegmentPath$Segment.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.7 KB  |  76 lines

  1. package sun.font;
  2.  
  3. import java.awt.geom.GeneralPath;
  4. import sun.font.LayoutPathImpl.SegmentPath;
  5.  
  6. class LayoutPathImpl$SegmentPath$Segment {
  7.    // $FF: renamed from: ix int
  8.    final int field_0;
  9.    // $FF: renamed from: ux double
  10.    final double field_1;
  11.    // $FF: renamed from: uy double
  12.    final double field_2;
  13.    final LayoutPathImpl.SegmentPath.LineInfo temp;
  14.    boolean broken;
  15.    // $FF: renamed from: cx double
  16.    double field_3;
  17.    // $FF: renamed from: cy double
  18.    double field_4;
  19.    // $FF: renamed from: gp java.awt.geom.GeneralPath
  20.    GeneralPath field_5;
  21.    // $FF: synthetic field
  22.    final LayoutPathImpl.SegmentPath this$0;
  23.  
  24.    LayoutPathImpl$SegmentPath$Segment(LayoutPathImpl.SegmentPath var1, int var2) {
  25.       this.this$0 = var1;
  26.       this.field_0 = var2;
  27.       double var3 = SegmentPath.access$000(var1)[var2 + 2] - SegmentPath.access$000(var1)[var2 - 1];
  28.       this.field_1 = (SegmentPath.access$000(var1)[var2] - SegmentPath.access$000(var1)[var2 - 3]) / var3;
  29.       this.field_2 = (SegmentPath.access$000(var1)[var2 + 1] - SegmentPath.access$000(var1)[var2 - 2]) / var3;
  30.       this.temp = new LayoutPathImpl.SegmentPath.LineInfo(var1);
  31.    }
  32.  
  33.    void init() {
  34.       this.broken = true;
  35.       this.field_3 = this.field_4 = Double.MIN_VALUE;
  36.       this.field_5 = new GeneralPath();
  37.    }
  38.  
  39.    void move() {
  40.       this.broken = true;
  41.    }
  42.  
  43.    void close() {
  44.       if (!this.broken) {
  45.          this.field_5.closePath();
  46.       }
  47.  
  48.    }
  49.  
  50.    void line(LayoutPathImpl.SegmentPath.LineInfo var1) {
  51.       if (var1.pin(this.field_0, this.temp)) {
  52.          LayoutPathImpl.SegmentPath.LineInfo var10000 = this.temp;
  53.          var10000.sx -= SegmentPath.access$000(this.this$0)[this.field_0 - 1];
  54.          double var2 = SegmentPath.access$000(this.this$0)[this.field_0 - 3] + this.temp.sx * this.field_1 - this.temp.sy * this.field_2;
  55.          double var4 = SegmentPath.access$000(this.this$0)[this.field_0 - 2] + this.temp.sx * this.field_2 + this.temp.sy * this.field_1;
  56.          var10000 = this.temp;
  57.          var10000.lx -= SegmentPath.access$000(this.this$0)[this.field_0 - 1];
  58.          double var6 = SegmentPath.access$000(this.this$0)[this.field_0 - 3] + this.temp.lx * this.field_1 - this.temp.ly * this.field_2;
  59.          double var8 = SegmentPath.access$000(this.this$0)[this.field_0 - 2] + this.temp.lx * this.field_2 + this.temp.ly * this.field_1;
  60.          if (var2 != this.field_3 || var4 != this.field_4) {
  61.             if (this.broken) {
  62.                this.field_5.moveTo((float)var2, (float)var4);
  63.             } else {
  64.                this.field_5.lineTo((float)var2, (float)var4);
  65.             }
  66.          }
  67.  
  68.          this.field_5.lineTo((float)var6, (float)var8);
  69.          this.broken = false;
  70.          this.field_3 = var6;
  71.          this.field_4 = var8;
  72.       }
  73.  
  74.    }
  75. }
  76.